package com.jyx.iterator.linked;

import com.jyx.iterator.collection.Collection;
import com.jyx.iterator.iterator.Iterator;
import com.jyx.iterator.node.Node;

/**
 * @author  	蒋永星
 * @email       jiangyongxing@myzczk.com
 * @company		www.urbanspace.cn
 * @date 		2016年5月29日 下午5:17:03 
 * @version 	1.0
 */
public class LinkedList implements Collection{

	Node currNode = null;
	Node nextNode = null;
	int size = 0;
	
	public void add(Object o){
		Node n = new Node(o,null);
		if(null == currNode){
			currNode = n;
			nextNode = n;
		}
		nextNode.setNextNode(n);
		nextNode = n;
	}
	
	public int size(){
		return size;
	}

	@Override
	public Iterator iterator() {
		return null;
	}
}
